<template>
  <div class="swipe">
    <van-swipe indicator-color="#333333" :width="320">
      <van-swipe-item :style="{ height: '198px' }">
        <div class="swipe-item blue">
          <div>
            <div class="title">智能职业规划，开启精彩人生</div>
            <div class="desc">毕业是第一步，走好很关键</div>
          </div>
          <div>
            <div class="already">
              已有
              <span class="number">33605</span>
              人完成评测
            </div>
            <div class="action">立即规划</div>
          </div>

          <div class="service-tag">
            特色服务
          </div>
        </div>
      </van-swipe-item>

      <van-swipe-item :style="{ height: '198px' }">
        <div class="swipe-item yellow">
          <div>
            <div class="title">智能职业规划，开启精彩人生</div>
            <div class="desc">毕业是第一步，走好很关键</div>
          </div>
          <div>
            <div class="already">
              已有
              <span class="number">33605</span>
              人完成评测
            </div>
            <div class="action">立即规划</div>
          </div>

          <div class="service-tag">
            特色服务
          </div>
        </div>
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import Vue from 'vue'
import { Swipe, SwipeItem } from 'vant'

Vue.use(Swipe)
Vue.use(SwipeItem)

export default {
  methods: {
    onAction() {}
  }
}
</script>

<style lang="less" scoped>
.swipe {
  margin: 20px 17px;

  /deep/ .van-swipe__indicators {
    bottom: 0;
  }

  /deep/ .van-swipe__indicator {
    background-color: #666666;
    width: 15px;
    height: 2px;
    border-radius: 2.75px;
  }

  .swipe-item {
    position: relative;
    width: calc(100vw - 70px);
    height: 132px;
    margin-right: 15.5px;
    border-radius: 5px;
    box-shadow: 1px 3px 7px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-flow: column;
    padding-top: 26px;
    padding-bottom: 22px;
    text-align: center;
    margin-top: 5px;

    .service-tag {
      width: 65px;
      height: 20px;
      background-color: #EC5431;
      position: absolute;
      top: -3px;
      right: -2px;
      border-radius: 10px 2px 2px 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      font-size: 11px;
    }

    .title {
      font-size: 18px;
      font-weight: 500;
      color: #222222;
    }

    .desc {
      font-size: 14px;
      color: #666666;
      margin-top: 4px;
    }

    .already {
      color: #999999;
      font-size: 12px;
    }

    .action {
      width: calc(100vw - 100px);
      color: #ffffff;
      border-radius: 5px;
      padding: 10px 0;
      margin-top: 11.5px;
    }
  }

  .blue {
    background: linear-gradient(to right bottom, #ffffff, #dbe5fa);
    .number {
      color: #4586ff;
    }
    .action {
      background-color: #4586ff;
    }
  }

  .yellow {
    background: linear-gradient(to right bottom, #ffffff, #fffaec);
    .number {
      color: #FF7002;
    }
    .action {
      background-color: #FF7002;
    }
  }
}
</style>
